<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 13哥 <yzb321055156@163.com>
// +----------------------------------------------------------------------
namespace app\api\model;
use think\Model;
class ImsMemberModel extends Model
{
    //获取个人关注的用户
    public function getfollowuser()
    {
        return $this->hasMany('ImsUserFollowModel', 'user_id', 'id')->field('user_id')->where('status', 1);
    }

    //获取个人被关注的用户（即 粉丝）
    public function getfans()
    {
        return $this->hasMany('ImsUserFollowModel', 'is_user_id', 'id')->field('user_id')->where('status', 1);
    }

}